#include <stdio.h>
#include <stdlib.h>

static int reverse(int value) {
	int res = 0;
	int i;
	while (value) {
		i = value % 10;
		res = res * 10 + i;
		value /= 10;
	}
	return res;
}


int main_190727_7_3() {
	int n = 0;
	scanf("%d", &n);
	n = reverse(n);
	printf("%d\n", n);
	return 0;
}